package com.all.learning.guava.other;

import java.util.Arrays;
import java.util.List;

import org.junit.Test;

import com.google.common.base.Joiner;
import com.google.common.collect.ImmutableList;
import com.google.common.primitives.Ints;

public class GGprimitives {

	@Test
	public void testInts() {
		int[] ints = {1,2,3,4,5};
		int[] ints2 = {44,55,66};
		Integer[] ints3 = {44,55,66};
		
		String s1 = Ints.join("/", ints);
		System.out.println(s1);
		
		String s2 = Joiner.on(";").join(ints3);
		System.out.println(s2);
		
		boolean b = Ints.contains(ints, 3);
		System.out.println(b);
		
		System.out.println(Ints.max(ints)+" \t" + Ints.indexOf(ints, 3));
		
		int[] concat = Ints.concat(ints, ints2);  
		System.out.println(Arrays.toString(concat));
		
	}

	@Test
	public  void test1() {
		int int1 = Ints.compare(4, 4);
		System.out.println(int1);
		
		List<Integer> list = ImmutableList.of(1, 2, 3, 4);
		int[] arr1 = Ints.toArray(list);
		
		Ints.asList(int1);
		
	}
	
}
